translateMarkup()

Description Performs the translation.
Arguments docName, siteRoot, docContent
The first argument is a string containing the file:// URL for the document to be translated.
The second argument is a string containing the file:// URL for the root of the site that contains the document to be translated. If the document is outside a site, this string might be empty.
The third argument is a string containing the contents of the document.
Returns A string containing the translated document.
Example The following instance of translateMarkup() calls the C function translateASP(), which is contained in a DLL (Windows) or code library (Macintosh) called ASPTrans:
function translateMarkup(docName, siteRoot, docContent){
  var translatedString = "";
  if (docContent.length > 0){
    translatedString = ASPTrans.translateASP(docName, siteRoot, docContent);
  }
  return translatedString;
}
For an all-JavaScript example, see A simple attribute translator example or A simple block/tag translator example.